﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Ithalat
{
    public partial class BankaHesaplari : XForm
    {
        public BankaHesaplari()
        {
            InitializeComponent();
        }

        private void BankaHesaplari_Load(object sender, EventArgs e)
        {
            gridView1.Init("GetBankaBilgileri");
            gridView1.AddDetailGrid(gridView2, "BankaHesapId");

            gridView1.BestFitColumns();
            gridView2.BestFitColumns();

            gridView1.EnableNewRow();
            gridView2.EnableNewRow();
            gridView1.AddAutoIncrementalPK("BankaHesapId");
            gridView2.AddAutoIncrementalPK("BankaHesapLinesId");

            splitContainerControl1.AutoSize();
            btnKaydet.ItemClick += btnKaydet_ItemClick;
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //gridView2.EnableRowDelete();

            //gridView2.EndEditing();

            gridView1.UpdateAll("", "BankaHesap", "", "BankaHesapLines");
            Notify("Kaydedildi");
        }
    }
}
